/*manager.h*/
#ifndef MANAGER_H
#define MANAGER_H

struct Manager{
	int index;
	int replyTo;
	int msgLock;
	int myName;
	int sleepCon;
	int state;
	int runScheduler;
	
	int checkQueueSize; 
	int cgSize;
	int currentGroup[MAX_TIX_CLERKS + MAX_FOOD_CLERKS];
	int lineLengths[MAX_TIX_CLERKS + MAX_FOOD_CLERKS];
	int msgsToSend, repliesWaiting;
	/*bools*/ int moviePlaying, checkLoop, cashLoop;
	int tixCash, foodCash;
	int numMsgs;
	struct Message tempMsg;
	struct Message msgList[MAX_TIX_CLERKS + MAX_FOOD_CLERKS];
	struct Message outgoing[MAX_TIX_CLERKS + MAX_FOOD_CLERKS];
};

void Manager_Scheduler();
struct Message Manager_GetMessage(int name);

void Manager_IdleAction();
void Manager_AvailAction();
void Manager_StartMovie();
void Manager_DecideCC();
void Manager_BackToCheck();
void Manager_BackToCash();
void Manager_ChATC();
void Manager_ChWTC();
void Manager_ChHTC();
void Manager_ChSTC();
void Manager_ChAFC();
void Manager_ChWFC();
void Manager_ChHFC();
void Manager_ChSFC();
void Manager_ChATT();
void Manager_ChWTT();
void Manager_ChHTT();
void Manager_ChSTT();
void Manager_CaATC();
void Manager_CaWTC();
void Manager_CaAFC();
void Manager_CaWFC();
void Manager_CaCTT();

#endif